1. Field of the Invention
The disclosure relates to an image compression method, an image decompression method, and an electronic device thereof, and more particularly to an image compression method with a constant compression ratio used for raw data of a digital image, an image decompression method, and an electronic device thereof.
2. Related Art
In a device such as a digital camera, raw data is the original data obtained by a multi-field sensor such as a charge coupled device (CCD). An image can not be watched by a used until the raw data is processed by an image processing device. However, a size of a compressed file is difficult to be controlled due to the technologies employed for compressing the raw data, like lossless compression or not visible lossy compression. In this type of compression manner, savable space is not fixed, and the saved storage space may not be determined until actual compression is completed. Most of latest image signal processors (ISPs) perform processing in unit of image bands instead. However, the multi-field sensor does not output the raw data in a fixed order, so it is difficult to give consideration to both a field order output by the multi-field sensor and the processing in unit of image bands. Especially, it is very difficult to give consideration to both the field order and the processing in unit of image bands to define a boundary between the field and the image band in a compressed bit stream.
Moreover, even though only a part of image bands in the image are required, a most instinctive method is decoding the entire compression result back to a full resolution and then selecting a required part for further processing. This method, requires a memory capable of accommodating a full resolution image. However, decoding overhead increase due to rapid increase of the image resolution.